﻿using System;

namespace ConsoleApp1
{
    class 作业2
    {
        static void Main(string[] args)
        {
           
            Account  g1 =new Account ( );
          g1. balance = 1000;
           g1.begin();
            Console.WriteLine("请指定您的余额");
            double balance = Convert.ToDouble(Console .ReadLine());
            Accounts m1 = new Accounts(balance);
            m1.outPut();
            Console.WriteLine("请输入您需要进行的操作。1/存钱，2/取钱，3/查看余额");
            int n = Convert.ToInt32(Console .ReadLine ());
            if (n == 1)
            {
                m1.cunMoney();
            }
            else if (n == 2) {
                m1.quMoney();
            } else if (n==3) {
                m1.chaMoney();
            }
        }
    }
    //无参一
    class Account{
       public double  balance;
       public void begin()
        {
            Console.WriteLine("默认余额{0}",balance);
         }

 }
}
